package com.hx.order.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.hx.common.annotation.Excel;
import com.hx.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 购物车对象 ord_cart_item
 *
 * @author ord
 * @date 2023-05-28
 */
public class CartItem extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 商品的id */
    private Long productId;

    /** 商品图片 */
    @Excel(name = "商品图片")
    private String productPic;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String productName;

    /** 购买数量 */
    @Excel(name = "购买数量")
    private Integer quantity;

    /** 添加到购物车的价格 */
    @Excel(name = "添加到购物车的价格")
    private BigDecimal price;

    /** 创建时间 */
    private Date createDate;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setProductId(Long productId)
    {
        this.productId = productId;
    }

    public Long getProductId()
    {
        return productId;
    }
    public void setProductPic(String productPic)
    {
        this.productPic = productPic;
    }

    public String getProductPic()
    {
        return productPic;
    }
    public void setProductName(String productName)
    {
        this.productName = productName;
    }

    public String getProductName()
    {
        return productName;
    }
    public void setQuantity(Integer quantity)
    {
        this.quantity = quantity;
    }

    public Integer getQuantity()
    {
        return quantity;
    }
    public void setPrice(BigDecimal price)
    {
        this.price = price;
    }

    public BigDecimal getPrice()
    {
        return price;
    }
    public void setCreateDate(Date createDate)
    {
        this.createDate = createDate;
    }

    public Date getCreateDate()
    {
        return createDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("productId", getProductId())
            .append("productPic", getProductPic())
            .append("productName", getProductName())
            .append("quantity", getQuantity())
            .append("price", getPrice())
            .append("createDate", getCreateDate())
            .toString();
    }
}
